{temp('kefu/head')}
</head>
<body>
	<div class="pd-20">
		<div class="form form-horizontal" id="form-article-add">
			<div class="row cl">
				<label class="form-label col-2">{if($rs['type'] == 1)}视频{else}文章{/if}名称:</label>
				<div class="formControls col-2" style="margin-top:3px;">
					{$rs['title']}
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-2">应扣积分:</label>
				<div class="formControls col-2" style="margin-top:3px;">
					{$rs['jifen']}
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-2">推送日期:</label>
				<div class="formControls col-2">
					<script>
						/* var now = new Date();
						var mintime = now.getFullYear()+"-"+((now.getMonth()+1)<10?"0":"")+(now.getMonth()+1)+"-"+((now.getDate()+1)<10?"0":"")+(now.getDate()+1); */
					</script>
					<input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'%y-%M-{%d+1}'})" id="datemin" class="input-text Wdate">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-2">受众类型:</label>
				<div class="formControls col-2">
					<span class="select-box">
						<select id="sztype" class="select">
							<option value="1">在校大学生</option>
							<option value="2">应届生</option>
						</select>
					</span>
				</div>
			</div>
			<div class="row cl">
				<div class="col-10 col-offset-2">
					<button onClick="tj();" class="btn btn-primary radius" type="submit">&nbsp;&nbsp;确定&nbsp;&nbsp;</button>
					<button onClick="layer_close();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
				</div>
			</div>
		</div>
	</div>
	<script type="text/javascript">
	function tj(){
		var spid = {$rs['spid']};
		var zjid = {$rs['zjid']};
		var datemin = $("#datemin").val();
		var sztype = $("#sztype").val();
		$.post('{$_url}/kefu/?act=tuisong&met=sp_c',{spid:spid,zjid:zjid,datemin:datemin,sztype:sztype},function(data){
			if(data == 'cg'){
				layer.alert('推送成功');
				setTimeout(function(){parent.location.reload()},800);return ;
			}else if(data == 'error'){
				layer.alert('推送失败');return ;
			}else if(data == '-1'){
				layer.alert('没有视频数据');return ;
			}else if(data == '-2'){
				layer.alert('推送时间不能低于当前时间');return ;
			}else if(data == '-3'){
				layer.alert('受众类型不能为空');return ;
			}else if(data == '-4'){
				layer.alert('暂无该类用户');return ;
			}else if(data == '-5'){
				layer.alert('推送时间不能为空');return ;
			}
		});
	}
	</script>
	{temp('kefu/foot')}
</body>
</html>